<?php 
/**
 * @author Eugenio Fage
 * http://eugeniofage.wordpress.com/
 * http://code.google.com/p/monky/
 * 
 */
 
$class[0]=' ';
$class[1] = ' class="altrow"';
$i=0;

$this->Html->script('theme/link-vote.js',false);
echo $this->element('report-link');
?>
<div class="links view">
  <div id="links-summary" style="width:620px;float:left">
    <h3>Submitted links</h3>
	<? if(empty($links)){ 
	  echo '<p>'.__('Sorry but the user hasnt submit any link.',true).'</p>';
	}else {
		foreach ($links as $link) echo $this->element('link',array('link'=>$link));
	} ?>
  </div>
  <div style="clear:both"></div>
   	<?php
   	if($numbers=$paginator->numbers()){
   		echo $paginator->prev('« Previous ', null, null, array('class' => 'disabled')).
	 	$numbers.
	 	$paginator->next(' Next »', null, null, array('class' => 'disabled'));
    }
    ?>
</div>
<div class="actions">
	<h3><?php __('Actions') ?></h3>
	<ul>
		<?php if($this->Session->read('Auth.User.id')==$user['User']['id']): ?>
		<li><?php echo $this->Html->link(__('Edit User', true), array('action' => 'edit', $user['User']['id'])); ?> </li>
		<?php endif; ?>
		<li><?php echo $this->Html->link(sprintf(__('View %s profile', true),$user['User']['username']), array('action' => 'view', $user['User']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('View submited links', true), array('action' => 'links', $user['User']['id'])); ?> </li>
		
		<?php 
		//@todo ver delete example
		//<li><?php echo $this->Html->link(__('View submited links', true), array('action' => 'links', $user['User']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['User']['id']));  </li>
		?>
	</ul>
</div>
